package com.shenmazong.servernewsapi.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@RestController
public class NewInfoController {
    /**
     * TODO uploadServiceFile 上传服务信息的文件
     * @param file
     * @param userId
     * @return
     */
    @PostMapping(value = "/uploadServiceFile")
    public Object uploadServiceFile(@RequestParam("uploadFile") MultipartFile file,
                                    @RequestParam("userId") Integer userId) {
        return null;
    }

    /**
     * TODO addServiceNews 增加服务的信息
     * @param title
     * @param content
     * @return
     */
    @PostMapping(value = "/addServiceNews")
    public Object addServiceNews(@RequestParam("userId") Long userId,
                                 @RequestParam("title") String title,
                                 @RequestParam("content") String content,
                                 @RequestParam("longitude") String longitude,
                                 @RequestParam("latitude") String latitude,
                                 @RequestParam("showTime") Long showTime) {
        return null;
    }

    /**
     * TODO setServiceNews 修改服务的信息
     * @param title
     * @param content
     * @param longitude
     * @param latitude
     * @param showTime
     * @return
     */
    @PostMapping(value = "/setServiceNews")
    public Object setServiceNews(@RequestParam("userId") Long userId,
                                 @RequestParam("newsId") Long newsId,
                                 @RequestParam("title") String title,
                                 @RequestParam("content") String content,
                                 @RequestParam("longitude") String longitude,
                                 @RequestParam("latitude") String latitude,
                                 @RequestParam("showTime") Long showTime) {
        return null;

    }

    /**
     * TODO setServiceNewsTime 设置信息展示时间
     * @param newsId
     * @param showTime
     * @return
     */
    @PostMapping(value = "/setServiceNewsTime")
    public Object setServiceNewsTime(@RequestParam("userId") Long userId,
                                     @RequestParam("newsId") Long newsId,
                                     @RequestParam("showTime") Long showTime) {
        return null;
    }

    /**
     * TODO addClickGood 用户点赞信息
     * @return
     */
    @PostMapping(value = "/addClickGood")
    public Object addClickGood(@RequestParam("userId") Long userId,
                               @RequestParam("newsId") Long newsId) {
        return null;

    }

    /**
     * TODO addNewsComment 添加评论
     * @param userId
     * @param newsId
     * @param comment
     * @return
     */
    @PostMapping(value = "/addNewsComment")
    public Object addNewsComment(@RequestParam("userId") Long userId,
                                 @RequestParam("newsId") Long newsId,
                                 @RequestParam("comment") String comment
                                 ) {
        return null;

    }

    /**
     * TODO delNewsComment 删除评论
     * @param userId
     * @param commentId
     * @return
     */
    @PostMapping(value = "/delNewsComment")
    public Object delNewsComment(@RequestParam("userId") Long userId,
                                 @RequestParam("commentId") Long commentId
                                 ) {
        return null;
    }
}
